﻿namespace LimitatorInterfaces.CorrectServices
{
    public class CorrectionLimitEntity
    {
        public string ClientCode { get;  set; }
        public decimal Value { get;  set; }
        public bool IsMoney { get;  set; }
        public string ActiveCode { get;  set; }
        public string TradeSystem { get;  set; }
        public bool Applied { get;  set; }

        public CorrectionType CorrectionType { get; private set; }

        public CorrectionLimitEntity()
        {
            Applied = false;
        }

        public CorrectionLimitEntity Clone()
        {
            return new CorrectionLimitEntity
                {
                    ClientCode = this.ClientCode,
                    Value = this.Value,
                    CorrectionType = this.CorrectionType
                };
        }

        public void SetValue(decimal val)
        {
            Value = val;
        }

        public void SetApplied()
        {
            Applied = true;
        }
    }
}
